home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 February
/
EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso
/
earcd
/
util1
/
yk211src.lha
/
Yak_2.11_Src
/
WBStartup
/
Include
/
Patch_libs.h
< prev
next >
Wrap
C/C++ Source or Header
|
1995-10-18
|
1KB
|
54 lines
/*
** Contains all prototypes and types definitions needed to patch libraries
** functions safely.
**
** Author: Gael Marziou
** Created: 14 July 1994 (Bastille Day ;-)
**
*/
#include <exec/types.h>
#include <exec/execbase.h>
#include <exec/memory.h>
#include <exec/semaphores.h>
#include <dos/dos.h>
#include <libraries/commodities.h>
#include <string.h>
#include <proto/dos.h>
#include <proto/exec.h>
#include "code.h"
/* Use a table and an array to make it a little more generic and easier to
* add functions.
*/
struct LVOTable
{
LONG lt_LVO;
struct Library *lt_LibBase;
ULONG lt_oldFunction;
ULONG lt_newFunction;
};
struct JumpTable
{
struct SignalSemaphore jt_Semaphore;
UWORD pad_word;
struct Task *jt_Owner;
UBYTE jt_Function[6]; /* at least there is one function to patch, each set of
* patches will extend this array to store the right number
* of functions
*/
};
/* protos */
BOOL InstallWedge(UBYTE *JTName, struct LVOTable *LVOArray, UBYTE NumberOfFunctions);
BOOL RemoveWedge(UBYTE *JTName, struct LVOTable *LVOArray, UBYTE NumberOfFunctions);
/* prototypes for the functions to be SetFunction()'ed. */
#define DEC_LVO(lvoname) extern lvoname